<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图书借阅</title>
<script src="/public/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
	function getstubycard(event,stucard){
		if(event.keyCode==13){
			$('#stuinfo').html('');
			$('#bookinfo').html('');
			$.get("__URL__/getstuinfo",{stucard:stucard},
				function(data){
					$('#stuinfo').html(data);
					$('#stucard').val('');
				}
			);
		}
	}
	
	function getbookbyisbn(event,bookisbn){
	  if(event.keyCode==13){
		  $.get("__URL__/getbookinfo",{bookisbn:bookisbn},
				function(data){
					$('#bookinfo').html(data);
					$('#bookisbn').val('');
				}
		  );
	  }
	}	
</script>
</head>

<body>
图书借阅</br>

请刷会员卡<input id="stucard" name="stucard" type="text" onkeydown="getstubycard(event,this.value);" />
<div id="stuinfo"></div>

请扫描书本条码：<input id="bookisbn" name="bookisbn" type="text" onkeydown="getbookbyisbn(event,this.value);" />
<div id="bookinfo"></div>
</body>
</html>